package com.mooc.fuxi.network;

import com.mooc.fuxi.entity.BannerEntity;
import com.mooc.fuxi.entity.NewsDetailEntity;
import com.mooc.fuxi.entity.NewsEntity;
import com.mooc.fuxi.entity.TypeEntity;

import io.reactivex.Observable;
import retrofit2.http.GET;
import retrofit2.http.Query;

public interface ApiService {

    //banner
    @GET("home/index/slide?token=1ec949a15fb709370f")
    Observable<BannerEntity>requestBanner();
    //新闻类型
    @GET("NewsType/getAllTypes")
    Observable<TypeEntity>requestType();
    //新闻列表
    @GET("News/getNews")
    Observable<NewsEntity>requestNews(@Query("newstype")int newstype,
                                      @Query("pagenum")int pagenum,
                                      @Query("pagesize")int pagesize);
    //新闻详情
    @GET("NewsDetail/getNewsDetail")
    Observable<NewsDetailEntity>requestDetail(@Query("newscode")String newscode);
}
